home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 January / MacHome Magazine Demo Disc January 2001.iso / mac / Software / Networking / InterMapper 3.0 - PPC.sea / InterMapper 3.0 - PPC / InterMapper™ 3.0-PPC / InterMapper™ 3.0-PPC.rsrc / PrTy_167_com.dartware.tcp.telnet < prev    next >
Encoding:
Text File  |  2000-07-24  |  2.7 KB  |  88 lines

  1. <!-- 
  2.     Telnet (com.dartware.tcp.telnet)
  3.     Copyright © 2000 Dartware, LLC. All rights reserved.
  4. -->
  5.  
  6. <header>
  7.     type            =     "tcp-script"
  8.     package            =     "com.dartware"
  9.     probe_name        =    "tcp.telnet"
  10.     human_name        =    "TELNET"
  11.     version            =     "1.1"
  12.     address_type    =     "IP"
  13.     port_number        =    "23"
  14.  
  15. </header>
  16.  
  17. <description>
  18.  
  19. ≤GB≥TELNET Protocol≤P≥
  20.  
  21. The protocol used for terminal-to-terminal communication and distributed computation as described in RFC 854. The default TCP port number for TELNET connections is port 23.
  22.  
  23. This probe lets you TELNET to a device, login with a name and password, and optionally enter a command. This probe is specifically designed to reject any TELNET options proffered by the TELNET server; the TCP connection always remains in the base "network virtual terminal" state. This probe lets you enter data at up to three prompts.
  24.  
  25. ≤i≥Intro String to Match≤p≥ is a string to match in the welcome banner sent by the TELNET server when you first connect. Leave this parameter blank if you want to match anything in the welcome banner.
  26.  
  27. ≤i≥First Prompt≤p≥ is the string to match in the first prompt. (e.g. “Login:”)
  28.  
  29. ≤i≥Reply #1≤p≥ is your reply to the first prompt. (i.e. your response to the “Login:” prompt)
  30.  
  31. ≤i≥Second Prompt≤p≥ is the string to match in the second prompt. (e.g. “Password:”) If this parameter is empty, the probe ignores the prompt string and it does not send its reply.
  32.  
  33. ≤i≥Reply #2≤p≥ is your reply to the second prompt. (i.e. your response to the “Password:” prompt.)
  34.  
  35. ≤i≥Third Prompt≤p≥ is the string to match in the third prompt. If this parameter is empty, the probe ignores the prompt string and its reply.
  36.  
  37. ≤i≥Reply #3≤p≥ is your reply to the third prompt.
  38.  
  39. </description>
  40.  
  41. <parameters>
  42.  
  43. "Intro String to Match"            = ""
  44. "First Prompt"                    = "Login:"
  45. "Reply #1"                        = "intermapper"
  46. "Second Prompt"                    = "Password:"
  47. "Reply #2"                        = "intermapper"
  48. "Third Prompt"                    = ""
  49. "Reply #3"                        = ""
  50. "Final String to Match"            = "incorrect"
  51.  
  52. </parameters>
  53.  
  54. <script>
  55.  
  56. CONN #60 "TELNET"
  57. WAIT #30 @IDLE (idle timeout in secs)
  58. DISC @DISCONNECT
  59. EXPT "${Intro String to Match}"i else goto @UNEXPECTED_INTRO
  60.  
  61. LINE OFF
  62. CHCK "${First Prompt}" else #+3
  63. EXPT "${First Prompt}"i
  64. SEND "${Reply #1}\r\n"
  65. CHCK "${Second Prompt}" else #+3
  66. EXPT "${Second Prompt}"i
  67. SEND "${Reply #2}\r\n"
  68. CHCK "${Third Prompt}" else #+3
  69. EXPT "${Third Prompt}"i
  70. SEND "${Reply #3}\r\n"
  71. LINE ON
  72.  
  73. EXPT "${Final String to Match}"
  74. DONE OKAY
  75.  
  76.  
  77. @UNEXPECTED_INTRO:
  78. STAT DOWN "[TELNET] Unexpected introduction from port ${_REMOTEPORT}. (${_LINE:50})"
  79. EXIT
  80.  
  81. @IDLE:
  82. DONE DOWN "[TELNET] No data for ${_IDLETIMEOUT} seconds.  Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
  83.  
  84. @DISCONNECT:
  85. DONE DOWN "[TELNET] Connection disconnected while expecting \"${_STRINGTOMATCH}\"."
  86.  
  87. </script>
  88.